import axios from 'axios'

export const instance = axios.create({
  baseURL: process.env.VITE_APP_TITLE,
  timeout: 1000
})

// 请求拦截
instance.interceptors.request.use(
  (config) => {
    return config
  },
  async (error) => {
    return await Promise.reject(error)
  }
)

// 响应拦截
instance.interceptors.response.use(
  (response) => {
    return response
  },
  async (error) => {
    return await Promise.reject(error)
  }
)
